home *** CD-ROM | disk | FTP | other *** search
- * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
- * The C++ Answer Book */
- * Tony Hansen */
- * All rights reserved. */
- include <process.h>
- include <debug.h> /* DELETE */
- / wait for termination and retrieve result
- ong process::result()
-
- if (debug) /*DELETE*/ cerr << "process" << this << "::result()\n";
- if (mustrecurse())
- return result();
-
- else
- {
- if (this == t_thisprocess)
- error("result called for this_process");
- if (debug) /*DELETE*/ cerr << "\t" << this << "->t_curstate == " << ps_print(t_curstate) << "\n";
-
- while (t_curstate != TASK_TERMINATED)
- {
- t_thisprocess->pause(this);
- if (debug) /*DELETE*/ cerr << "\t" << this << "->t_curstate == " << ps_print(t_curstate) << "\n";
- }
-
- if (debug) /*DELETE*/ cerr << "<<<< process" << this << "::result()\n";
- return t_result;
- }
-
-